package com.aspose.cells;

class zcct {
   private zcda a;
   private Workbook b;
   private com.aspose.cells.a.f.zi c;
   private zoz d;
   private zauk e;
   private zaul f;
   private int g;
   private byte[] h;
   private int i;
   private String j;
   private zbxz k;
   private int l = 0;

   zcct(zcda var1, zoz var2, zauk var3, String var4, com.aspose.cells.a.f.zi var5) {
      this.a = var1;
      this.d = var2;
      this.j = var4;
      this.f = var2.a.getWorksheets().U();
      this.e = var3;
      this.b = var2.a;
      this.c = var5;
   }

   void a(zbxz var1) throws Exception {
      if (var1 != null) {
         int var2 = 0;
         this.k = var1;
         int var3 = -1;

         while(true) {
            this.g = this.k.a();
            byte var5;
            int[] var6;
            int var7;
            switch(this.g) {
            case 20:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = null;
                  ++var2;
               }
               break;
            case 21:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = com.aspose.cells.b.a.zc.f(this.h, 0);
                  ++var2;
               }
               break;
            case 22:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = this.h[0] != 0;
                  ++var2;
               }
               break;
            case 23:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  switch(this.h[0]) {
                  case 0:
                     ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = "#NULL!";
                     break;
                  case 7:
                     ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = "#DIV/0!";
                     break;
                  case 15:
                     ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = "#VALUE!";
                     break;
                  case 23:
                     ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = "#REF!";
                     break;
                  case 29:
                     ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = "#NAME?";
                     break;
                  case 36:
                     ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = "#NUM!";
                     break;
                  case 42:
                     ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = "#N/A";
                  }

                  ++var2;
               }
               break;
            case 24:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  var5 = 0;
                  var6 = new int[]{var5};
                  ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = zcch.a(this.h, var6);
                  var7 = var6[0];
                  ++var2;
               }
               break;
            case 25:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = zcch.c(this.h, 0);
                  ++var2;
               }
               break;
            case 26:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = com.aspose.cells.b.a.zc.a(this.h, 0);
                  ++var2;
               }
               break;
            case 31:
               this.h = this.a.a(this.k);
               if (this.l < this.e.n.a.size() && var2 < ((Object[])((Object[])this.e.n.a.get(this.l))).length && var3 < this.e.n.a.size()) {
                  var5 = 0;
                  var6 = new int[]{var5};
                  ((Object[])((Object[])this.e.n.a.get(var3)))[var2] = zcch.a(this.h, var6);
                  var7 = var6[0];
                  ++var2;
               }
               break;
            case 33:
               this.a();
               ++this.l;
               break;
            case 34:
               this.h = this.a.a(this.k);
               var2 = 0;
               ++var3;
               break;
            case 193:
               this.h = this.a.a(this.k);
               zaun var4 = new zaun(this.e);
               this.e.n = var4;
               var4.a();
               break;
            case 194:
               this.k.a(1L);
               return;
            default:
               this.i = this.k.b();
               this.k.a((long)this.i);
            }
         }
      }
   }

   private void a() throws Exception {
      this.h = this.a.a(this.k);
      int var1 = this.e.i;
      boolean[] var2 = this.e.n.b;
      int var3 = 0;

      for(int var4 = 0; var3 < var1; ++var3) {
         if (var2[var3]) {
            int var5 = com.aspose.cells.b.a.zc.a(this.h, var4);
            if (this.l < this.e.n.a.size() && var3 < ((Object[])((Object[])this.e.n.a.get(this.l))).length) {
               ((Object[])((Object[])this.e.n.a.get(this.l)))[var3] = var5;
            }

            var4 += 4;
         } else if (var3 < this.e.p.size()) {
            zbqs var7 = (zbqs)((zbqs)this.e.p.get(var3));
            if (this.l < this.e.n.a.size() && var3 < ((Object[])((Object[])this.e.n.a.get(this.l))).length) {
               if (var7.f()) {
                  ((Object[])((Object[])this.e.n.a.get(this.l)))[var3] = com.aspose.cells.b.a.zc.f(this.h, var4);
                  var4 += 8;
               } else if (var7.j()) {
                  ((Object[])((Object[])this.e.n.a.get(this.l)))[var3] = zcch.c(this.h, var4);
                  var4 += 8;
               } else {
                  int[] var6 = new int[]{var4};
                  ((Object[])((Object[])this.e.n.a.get(this.l)))[var3] = zcch.a(this.h, var6);
                  var4 = var6[0];
               }
            }
         }
      }

   }
}
